home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / game / role / ldmud-3.2-bin.lha / mud / doc / efun / shadow < prev    next >
Text File  |  2001-04-06  |  2KB  |  41 lines

  1. SYNOPSIS
  2.         object shadow(object ob, int flag)
  3.  
  4. DESCRIPTION
  5.         If flag is non-zero then the current object will shadow ob. If
  6.         flag is 0 then either 0 will be returned or the object that is
  7.         shadowing ob.
  8.         
  9.         The calling object must be permitted by the master object to
  10.         do the shadowing. In most installations, an object that
  11.         defines the function query_prevent_shadow() to return 1
  12.         can't be shadowed, and the shadow() function will return 0
  13.         instead of ob.
  14.  
  15.         shadow() also fails if the calling object tries to shadow
  16.         a function that was defined as ``nomask'', if the program was
  17.         compiled with the #pragma no_shadow, or if the calling
  18.         object is already shadowing, is being shadowed, or has an
  19.         environment. Also the target ob must not be shadowing
  20.         something else.
  21.         
  22.         If an object A shadows an object B then all call_other() to B
  23.         will be redirected to A. If object A has not defined the
  24.         function, then the call will be passed to B. There is only on
  25.         object that can call functions in B with call_other(), and
  26.         that is A. Not even object B can call_other() itself. All
  27.         normal (internal) function calls inside B will however remain
  28.         internal to B.
  29.         
  30. HISTORY
  31.         Up to 3.2.1@46, destructing a shadowed object also destructs
  32.         all shadows. Since 3.2.1@47, shadows may survive the
  33.         destruction of the shadowee (unless the prepare_destruct() in
  34.         the master object destructs them manually).
  35.  
  36.         Since LDMud 3.2.8, programs may protect themselves from being
  37.         shadowed with the #pragma no_shadow.
  38.  
  39. SEE ALSO
  40.         query_shadowing(E), unshadow(E), query_allow_shadow(M)
  41.